class Solution(object):
    def findMinDifference(self, timePoints):
        """
        :type timePoints: List[str]
        :rtype: int
        """
        def convert(s):
            s = s.split(':')
            return int(s[0]) * 60 + int(s[1])
        time = [convert(s) for s in timePoints]
        time.sort()
        min_time = float('inf')
        for i in range(1, len(time)):
            min_time = min(min_time, time[i] - time[i - 1])
        min_time = min(min_time, time[0] + 24 * 60 - time[-1])
        return min_time
